//
//  FMDBTool.h
//  滴滴快拍
//
//  Created by dllo on 16/5/24.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Find.h"
#import "AGLChannel.h"

@interface FMDBTool : NSObject
+(instancetype)shareFMDBTool;

- (void)openDB;
- (void)openFavoriteDB;



- (void)createTable;
- (void)createFavoriteTable;

- (void)insertFavorite:(AGLChannel *)channel;
- (void)insertChannel:(Find *)channel;


- (void)deleteFavorite:(AGLChannel *)channel;
- (void)deleteChannel:(Find *)channel;

- (NSMutableArray *)selectFavorite;
- (NSMutableArray *)selectFind;



- (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName; 
- (BOOL)columnFavoriteExists:(NSString *)columnName inTableWithName:(NSString *)tableName;


@end
